﻿using Cysharp.Threading.Tasks;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using UniRx;

public class MainMenuPanel : UIPanelBase
{
    [SerializeField]
    private Button m_NewGameButton, m_LoadGameButton, m_SettingButton, m_AboutButton, m_QuitButton;

    protected override void OnInit()
    {
        m_NewGameButton.onClick.AddListener(OnNewGameButton);
        m_LoadGameButton.onClick.AddListener(OnLoadGameButton);
        m_SettingButton.onClick.AddListener(OnSettingButton);
        m_AboutButton.onClick.AddListener(OnAboutButton);
        m_QuitButton.onClick.AddListener(OnQuitGameButton);
    }

    private void OnNewGameButton()
    {
        GameManager.instance.NewGame();
        Hide();
    }

    private void OnLoadGameButton()
    {

    }

    private void OnSettingButton()
    {

    }

    private void OnAboutButton()
    {

    }

    private void OnQuitGameButton()
    {
        GameManager.instance.QuitGame();
    }
}